<template>
	<view class="user clearfix  hv100">
		<image src="/static/user/dianpu.png" class="dianpui" mode=""></image>
		<cu-custom bgColor="bg-transparent text-white" isBack>
			<block slot="content">我的店铺</block>
		</cu-custom>
		<view class="flex flex-direction align-center text-white mt30 por">
			<image :src="storeImg" class="block60" mode=""></image>
			<view class="f12 mt10">{{storeName}}</view>
		</view>
		<view class="store-price shadow-goods flex align-center justify-between por bg-white">
			<view class="wp33 flex flex-direction align-center">
				<view class="flex align-center px10 h45s">
					<text class="f18 huanhang text-black ellipsis3">{{allmoney}}</text>
					<text class="text-black">元</text>
				</view>
				<view class=" text-info">总金额</view>
			</view> 
			<view class="store-line"></view>
			<view class="wp33 flex flex-direction align-center">
				<view class="flex align-center px10 h45s">
					<text class="f18 huanhang text-black ellipsis3">{{dayMoney}}</text>
					<text class="text-black">元</text>
				</view>
				<view class=" text-info">今日金额</view>
			</view>
			<view class="store-line"></view>
			<view class="wp33 flex flex-direction align-center">
				<view class="flex align-center px10 h45s ">
					<text class="f18 huanhang text-black ellipsis3">{{countNum}}</text>
					<text class="text-black">单</text>
				</view>
				<view class=" text-info">订单数</view>
			</view>
		</view>
		<view class="flex align-center shadow-goods px15 mt15 flex-wrap por bg-white mx15">
			<view class="wp33 flex flex-direction align-center py20" >
				<image src="/static/store/nav0.png" class="block35"></image>
				<text class="mt10">订单中心</text>
			</view>
			
			<view class="wp33 flex flex-direction align-center py20" @click="pushPage('/pages/mystore/tixian?money='+allmoney)">
				<image src="/static/store/nav1.png" class="block35"></image>
				<text class="mt10">提现</text>
			</view>
			<view class="wp33 flex flex-direction align-center py20" @click="pushPage('/pages/mystore/tixianjl')">
				<image src="/static/store/nav2.png" class="block35"></image>
				<text class="mt10">提现记录</text>
			</view>
			<view class="wp33 flex flex-direction align-center py20" >
				<image src="/static/store/nav3.png" class="block35"></image>
				<text class="mt10">我的消息</text>
			</view>
			<view class="wp33 flex flex-direction align-center py20" @click="pushPage('/pages/user/kefu')">
				<image src="/static/store/nav4.png" class="block35"></image>
				<text class="mt10">联系客服</text>
			</view>
		</view>
	</view>
</template>

<script>
import { mapState, mapActions } from 'vuex'
export default {
	data() {
		return {
			storeImg:'/static/order/yidangdang.png',
			storeName:'益当当健康鞋业',
			tel:'',
			allmoney:'1802.22',
			dayMoney:841.01,
			countNum:'12',
			htmlurl:''
		}
	},
	computed: {
		...mapState(['userInfo','update'])
	},
	onLoad() {
		//this.getData()
	},
	onShow() {
		if(this.update){
			this.getData()
			this.setUpdate(false)
		}
	},
	methods: {
		...mapActions(['logout','getUser','setUpdate']),
		async getData() {
			let { data } = await this.$http.post('user.mystore')
			this.storeImg=data.storeImg
			this.storeName=data.storeName
			this.tel=data.tel
			this.htmlurl=data.link
			this.allmoney=data.countMoney
			this.dayMoney=data.dayMoney
			this.countNum=data.countNum
		},
		tohtmlurl(){
			plus.runtime.openURL(this.htmlurl)
		}
	}
}
</script>

<style lang="less">

.por{
	position: relative;
	z-index: 31;
}
.store-jianian{
	background-image: linear-gradient(to right, #FF8463, #FE4725) !important;
}	
.store-price{
	width: calc(100% - 60rpx);
	margin-left: 30rpx;
	min-height: 220rpx;
	border-radius: 10rpx;
	margin-top: 66rpx;
}
.wp33{
	width:33.3%;
}
.store-line{
	height: 60rpx;
	width: 2rpx;
	background-color: #E0E0E0;
}
.br1-store{
	border-right: 1rpx solid #CCCCCC;
}
.bt1-store{
	border-top: 1rpx solid #CCCCCC;
}
.huanhang{
	word-break: break-word;
}
.h45s{
	height: 120rpx;
}
.dianpui{
	position: fixed;
	top: 0;
	width: 100%;
	height: calc(560rpx + var(--status-bar-height));
}
</style>
